package com.heima.user.controller.v1;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.Query;
import com.heima.model.admin.pojos.ApUserRealname;
import com.heima.model.user.dtos.AuthDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.user.service.AuthService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author: Administrator
 * CreateTime: 2024/10/10
 * Project: heima-leadnews
 */
@RestController
@RequestMapping("/api/v1/auth")
@RequiredArgsConstructor
public class AuthController {

    private final AuthService authService;

    /**
     * 分页查询
     * @param authDto
     * @return
     */
    @PostMapping("/list")
    public ResponseResult list(@RequestBody AuthDto authDto) {
        return authService.list(authDto);
    }

    /**
     * 审核失败
     * @param authDto
     * @return
     */
    @PostMapping("/authFail")
    public ResponseResult authFail(@RequestBody AuthDto authDto) {
        return authService.authFail(authDto);
    }

    /**
     * 审核成功
     * @param authDto
     * @return
     */
    @PostMapping("/authPass")
    public ResponseResult authPass(@RequestBody AuthDto authDto) {
        return authService.authPass(authDto);
    }


}
